package pl.prv.polanie.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;

public class RoomDTO extends Object implements IsSerializable {

	private long id;
	private String name;
	private Long capacity;
	private BuildingDTO building;
	private RoomTypeDTO roomType;	

	public RoomDTO() {}
	
	public RoomDTO(String name, Long capacity) {
		this.name = name;
		this.capacity = capacity;
	}
	public long getId() {
		return id;
	}
	protected void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getCapacity() {
		return capacity;
	}
	public BuildingDTO getBuilding() {
		return building;
	}
	public RoomTypeDTO getRoomType() {
		return roomType;
	}
	public void setCapacity(Long capacity) {
		this.capacity = capacity;
	}
	public void setBuilding(BuildingDTO building) {
		this.building = building;
	}
	public void setRoomType(RoomTypeDTO roomType) {
		this.roomType = roomType;
	}

	public String toString() {
		String result = "" +
			"[ " + RoomDTO.class + "]" +
			"name: " + name + 
			", capacity: " + capacity +
			", building: " + building.getSymbol() +
			", roomType: " + roomType.getName()
			;
		return result;
	}
	
	public String toLabel() {
		String r = "" + 
			getName() + " " +
			"(" + getRoomType().getName() + ")";
		return r;
	}
	
}
